package wnxy.wn44.shopwn.utils;

import javax.servlet.http.Cookie;

public class CookieUtils {

    public static Cookie  getCookie(String cookieName,Cookie[] cookies){
        if (cookies==null||cookies.length==0||cookieName==null||"".equals(cookieName)){
            return null;
        }
        for (Cookie co:cookies){
            if (co.getName().equals(cookieName)){
                return co;
            }
        }
        return null;

    }
}
